export const url_config = "https://218.205.210.214";

export const AMAP_KEY = "280802ed0116fef931dbcf5e7e9278d7";
export const EQUIP_CLASSIFY = [{
		code: "EC",
		label: "换电柜"
	},
	// {
	// 	code: "CC",
	// 	label: "充电柜"
	// },
	{
		code: "CS",
		label: "充电堆"
	},
];
export const BIN_STATUS = {
	0: "空仓",
	1: "充电中",
	2: "充满电",
	3: "禁用",
	4: "停充",
};
export const getLockOption = [{
		text: '常开',
		value: '0',
	},
	{
		text: '常闭',
		value: '1',
	},
];

// 主控2.0/3.0版本
export const mainControlVersion = [{
        text: '2.0',
        value: '0',
    },
    {
        text: '3.0',
        value: '1',
    },
];
// 电池在位模式
export const batteryIsOn = [{
		text: '常开',
		value: '0',
	},
	{
		text: '常闭',
		value: '1',
	},
	{
		text: '不使能',
		value: '2',
	},
];
// 运行模式
export const runState = [{
		text: '自动运行',
		value: '0',
	},
	{
		text: '充电运行',
		value: '1',
	},
	{
		text: '放电运行',
		value: '2',
	},
	{
		text: '休眠',
		value: '3',
	},
	{
		text: '关机',
		value: '4',
	},
	{
		text: '空闲',
		value: '5',
		disable: true,
	},
	{
		text: '充满',
		value: '6',
		disable: true,
	},
	{
		text: '限额充电',
		value: '7',
		disable: true,
	},
	{
		text: '不设置',
		value: '255',
	},
];
// 充电电流
export const electricJuice = [{
		text: '不设置',
		value: '0',
	},
	{
		text: '自动充电电流系数0.1',
		value: '1',
	},
	{
		text: '自动充电电流系数0.2',
		value: '2',
	},
	{
		text: '自动充电电流系数0.3',
		value: '3',
	},
	{
		text: '自动充电电流系数0.4',
		value: '4',
	},
	{
		text: '自动充电电流系数0.5',
		value: '5',
	},
	{
		text: '自动充电电流系数0.6',
		value: '6',
	},
	{
		text: '自动充电电流系数0.7',
		value: '7',
	},
	{
		text: '自动充电电流系数0.8',
		value: '8',
	},
	{
		text: '自动充电电流系数0.9',
		value: '9',
	},
	{
		text: '自动充电电流系数0.10',
		value: '10',
	},
];
// 电池类型
export const batteryType = [{
		text: '自动判断',
		value: '0',
	},
	{
		text: '磷酸铁锂',
		value: '1',
	},
	{
		text: '锰锂电池',
		value: '2',
	},
	{
		text: '钛酸锂电池',
		value: '3',
	},
	{
		text: '不设置',
		value: '255',
	},
];
// 备电模式
export const electricMode = [{
		text: '禁止备电模式',
		value: '0',
	},
	{
		text: '使能备电模式',
		value: '1',
	},
	{
		text: '不设置',
		value: '255',
	},
];
// 气溶胶 
export const aerosol =[
    {
        text: '开启',
        value: '0',
    },
    {
        text: '关闭',
        value: '1',
    },
    {
        text: '不设置',
        value: '2',
    },
];

// 充电堆类型
export const CHARGING_TYPE = [{
		value: "1",
		text: "无交流电表"
	},
	{
		value: "2",
		text: "有交流电表"
	},
];

export const colorArray = [
	"#24b1ea", "#876e3f", "#04d582", "#e32280", "#cb3b0c", "#f57223",
	"#3afcb2", "#880808", "#138cd0", "#3c047d", "#51aa45", "#7c8ae4",
	"#05f7e0", "#b526da", "#67c23a", "#e6a23c", "#f56c6c", "#f84cd6",
	"#2b2f24", "#e5b713", "#1b5057", "#86174e", "#014f55", "#32cc72",
	"#5473E8"
];

export const subscribeMsg = 'fZ1rxoSFOd0UlxEV3FSfayJvm-4b2bdl_cHJutMrPBA'; //消息通知
export const modelId = 'YC_ZwbPHaBvz0otn1RwkFg'; //

// 天地图key的负载均衡
export const aks = [
	"9fb98ddef3a09bba775dd69c2f200037",
	"dc922a4c0180610756bdcf0fb60c7cb4",
	"c302a2d9994927d20652de27fad259ac",
];

export const rand = (min = 0, max = 1) => (
	Math.round(Math.random() * (max - min) + min)
)

const akProxy = new Proxy(aks, {
	get(target, prop) {
		if (prop === 'ak') {
			return target[rand(0, target.length - 1)]
		}
		return target[prop]
	}
})

// 天地图 随机key
export const mapKy = akProxy.ak;

export const alarmSemaphoreCode = "06040070";